function defer () {
  let ret = {
    promise: null,
    resolve: null,
    reject: null
  }
  ret.promise = new Promise(function (resolve, reject) {
    ret.resolve = resolve
    ret.reject = reject
  })
  return ret
}

export default defer
